package com.example.customannotation.IDempotent;

/**
 * Created with IntelliJ IDEA 2023.
 * Description:
 * User: homechen
 * Date: 2024-04-24
 * Time: 20:28
 */

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 幂等性注解
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Idempotent {
    //  请求标识符参数名称
    String requestId() default "requestID";

    // 幂等性有效时长  秒
    int expireTime() default 60;
}
